# 设计一个简单员工系统设计，包括不同类型的员工（如全职员工和兼职员工）。每个员工有不同的薪资计算方法
class Employee:
    def __init__(self, hours, hourly_rate):
        self.hours = hours
        self.hourly_rate = hourly_rate

    def calculate_salary(self):
        pass

class FullTimeEmployee(Employee):
    def __init__(self, hours, hourly_rate):
        super().__init__(hours, hourly_rate)

    def calculate_salary(self):
        return self.hours * self.hourly_rate

class PartTimeEmployee(Employee):
    def __init__(self, hours, hourly_rate):
        super().__init__(hours, hourly_rate)

    def calculate_salary(self):
        return self.hours * self.hourly_rate

full_time_employee = FullTimeEmployee(160, 100.5)
full_time_salary = full_time_employee.calculate_salary()
print("全职员工的薪资是:", full_time_salary)

part_time_employee = PartTimeEmployee(80, 50)
part_time_salary = part_time_employee.calculate_salary()
print("兼职员工的薪资是:", part_time_salary)


